//
//  JBEventListCell.m
//  JBBasicDataViewModuleController
//
//  Created by Yongbin Zhang on 12/23/13.
//  Copyright (c) 2013 JustBen. All rights reserved.
//

#import "JBEventListCell.h"

#import "JBStructEvent.h"


@implementation JBEventListCell

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
    }
    return self;
}


#pragma mark - 模版方法
//  根据cellData更新View
- (void)updateViewContents
{
    //  TO DO
    JBStructEvent *structEvent = (JBStructEvent *)self.cellData;
    
    self.titleLabel.text = structEvent.title;
    self.addressLabel.text = structEvent.address;
    
    self.startTimeLabel.text = structEvent.startTime;
    self.endTimeLabel.text = structEvent.endTime;
    
    if (self.indexPath.row%2) {
        self.backgroundColor = [UIColor groupTableViewBackgroundColor];
    } else {
        self.backgroundColor = [UIColor whiteColor];
    }
}


#pragma mark - 模版方法
//  cell的高度
+ (CGFloat)cellHeightAtIndexPath:(NSIndexPath *)indexPath WithCellData:(id)cellData
{
    //  TO DO
    return 80.0f;
}

@end
